package com.maiji.cloud.entities.community;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;

@NoArgsConstructor
@Data
@Accessors(chain=true)
@TableName("com_userRelation")
public class ComUserRelation {

    private String followerId; //粉丝ID

    private String focuserId;// 被关注人ID

    //followerId 是 focuserId 的 粉丝 或者 被关注人
    private Integer type; // 0:粉丝 1:互粉

    private Long followTime;//关注时间戳

    @TableField(exist = false)
    @ApiModelProperty("是否关注")
    private Boolean isFollow;

    public Boolean getFollow() {
        return type == 1 ? true : false;
    }
}
